#!/bin/bash

# script to test table transcriber executable

echo "Copying tabletranscriber2 executable..."
cp dist/Debug/GNU-Linux-x86/tabletranscriber2 .
echo "Copy done."

pathImageNotRotated90Degrees="/books/caracterizacao/baixa_resolucao/image278.png"
pathImageRotated90Degrees="/books/caracterizacao/baixa_resolucao/image133.png"
pathImageRotated90Degrees2="/books/mensagem/baixa_resolucao/image99.png"
pathImageMultipleTableIntoOnePage="/books/estatisticas/baixa_resolucao/image49.png"
pathImageInvalid1=""
pathImageInvalid2="/books/caracterizacao/"

modelsList1="model1"
modelsList2="model2"
modelsList3="model1,model2"
modelsList4=""
modelsList5="aaa"

flag1="-r"
flag2="-nr"
flag3="sdk"

echo "Test1: ---------------------------------------------------------------------"
echo "1: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList1 $flag1
echo "2: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList2 $flag1
echo "3: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList3 $flag1
echo "4: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList4 $flag1
echo "5: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList5 $flag1
echo "----------------------------------------------------------------------------"

echo "Test2: ---------------------------------------------------------------------"
echo "6: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList1 $flag2
echo "7: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList2 $flag2
echo "8: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList3 $flag2
echo "9: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList4 $flag2
echo "10: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList5 $flag2
echo "----------------------------------------------------------------------------"

echo "Test3: ---------------------------------------------------------------------"
echo "11: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList1 $flag3
echo "12: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList2 $flag3
echo "13: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList3 $flag3
echo "14: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList4 $flag3
echo "15: "; ./tabletranscriber2 $pathImageRotated90Degrees $modelsList5 $flag3
echo "----------------------------------------------------------------------------"

echo "Test4: ---------------------------------------------------------------------"
echo "16: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList1 $flag1
echo "17: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList2 $flag1
echo "18: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList3 $flag1
echo "19: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList4 $flag1
echo "20: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList5 $flag1
echo "----------------------------------------------------------------------------"

echo "Test5: ---------------------------------------------------------------------"
echo "21: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList1 $flag2
echo "22: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList2 $flag2
echo "23: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList3 $flag2
echo "24: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList4 $flag2
echo "25: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList5 $flag2
echo "----------------------------------------------------------------------------"

echo "Test6: ---------------------------------------------------------------------"
echo "26: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList1 $flag3
echo "27: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList2 $flag3
echo "28: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList3 $flag3
echo "29: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList4 $flag3
echo "30: "; ./tabletranscriber2 $pathImageNotRotated90Degrees $modelsList5 $flag3
echo "----------------------------------------------------------------------------"

echo "Test7: ---------------------------------------------------------------------"
echo "31: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList1 $flag1
echo "32: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList2 $flag1
echo "33: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList3 $flag1
echo "34: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList4 $flag1
echo "35: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList5 $flag1
echo "----------------------------------------------------------------------------"

echo "Test8: ---------------------------------------------------------------------"
echo "36: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList1 $flag2
echo "37: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList2 $flag2
echo "38: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList3 $flag2
echo "39: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList4 $flag2
echo "40: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList5 $flag2
echo "----------------------------------------------------------------------------"

echo "Test9: ---------------------------------------------------------------------"
echo "41: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList1 $flag3
echo "42: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList2 $flag3
echo "43: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList3 $flag3
echo "44: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList4 $flag3
echo "45: "; ./tabletranscriber2 $pathImageInvalid1 $modelsList5 $flag3
echo "----------------------------------------------------------------------------"

echo "Test10: ---------------------------------------------------------------------"
echo "46: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList1 $flag1
echo "47: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList2 $flag1
echo "48: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList3 $flag1
echo "49: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList4 $flag1
echo "50: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList5 $flag1
echo "----------------------------------------------------------------------------"

echo "Test11: ---------------------------------------------------------------------"
echo "51: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList1 $flag2
echo "52: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList2 $flag2
echo "53: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList3 $flag2
echo "54: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList4 $flag2
echo "55: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList5 $flag2
echo "----------------------------------------------------------------------------"

echo "Test12: ---------------------------------------------------------------------"
echo "56: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList1 $flag3
echo "57: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList2 $flag3
echo "58: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList3 $flag3
echo "59: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList4 $flag3
echo "60: "; ./tabletranscriber2 $pathImageInvalid2 $modelsList5 $flag3
echo "----------------------------------------------------------------------------"

echo "Test13: ---------------------------------------------------------------------"
echo "61: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList1 $flag1
echo "62: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList2 $flag1
echo "63: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList3 $flag1
echo "64: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList4 $flag1
echo "65: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList5 $flag1
echo "----------------------------------------------------------------------------"

echo "Test14: ---------------------------------------------------------------------"
echo "66: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList1 $flag2
echo "67: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList2 $flag2
echo "68: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList3 $flag2
echo "69: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList4 $flag2
echo "70: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList5 $flag2
echo "----------------------------------------------------------------------------"

echo "Test15: ---------------------------------------------------------------------"
echo "71: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList1 $flag3
echo "72: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList2 $flag3
echo "73: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList3 $flag3
echo "74: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList4 $flag3
echo "75: "; ./tabletranscriber2 $pathImageRotated90Degrees2 $modelsList5 $flag3
echo "----------------------------------------------------------------------------"

echo "Test16: ---------------------------------------------------------------------"
echo "76: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList1 $flag1
echo "77: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList2 $flag1
echo "78: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList3 $flag1
echo "79: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList4 $flag1
echo "80: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList5 $flag1
echo "----------------------------------------------------------------------------"

echo "Test17: ---------------------------------------------------------------------"
echo "81: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList1 $flag2
echo "82: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList2 $flag2
echo "83: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList3 $flag2
echo "84: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList4 $flag2
echo "85: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList5 $flag2
echo "----------------------------------------------------------------------------"

echo "Test18: ---------------------------------------------------------------------"
echo "86: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList1 $flag3
echo "87: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList2 $flag3
echo "88: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList3 $flag3
echo "89: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList4 $flag3
echo "90: "; ./tabletranscriber2 $pathImageMultipleTableIntoOnePage $modelsList5 $flag3
echo "----------------------------------------------------------------------------"
